﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EasyPiano
{
    public class MusicScore
    {
        public int musicLine;
        public int soundIndex;
        public float duration;

        public MusicScore(int soundIndex, float duration, int musicLine = 1)
        {
            this.musicLine = musicLine;
            this.soundIndex = soundIndex;
            this.duration = duration;
        }
        public MusicScore(string scoreStr, float duration, int musicLine = 1)
        {
            this.musicLine = musicLine;
            this.SoundIndex = scoreStr;
            this.duration = duration;
        }

        public string ScoreString
        {
            get
            {
                return Util.SoundIndexToString(this.soundIndex);
            }
        }

        public string SoundIndex
        {
            set
            {
                this.soundIndex = Util.SoundStringToIndex(value);
            }
        }
    }
}
